/*
 * @Author: your name
 * @Date: 2021-04-08 10:43:26
 * @LastEditTime: 2021-07-19 14:34:32
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \dolphin-data-center-front-end\src\main.js
 */
import Vue from 'vue'
import App from './App.vue'
import { initRouter } from './router'
import './theme/index.less'
import Antd from 'ant-design-vue'
import Viser from 'viser-vue'
import '@/mock'
import store from './store'
import 'animate.css/source/animate.css'
import Plugins from '@/plugins'
import { initI18n } from '@/utils/i18n'
import bootstrap from '@/bootstrap'
import 'moment/locale/zh-cn'
import { storage } from './utils/util' // 本地存储
Vue.prototype.$Storage = storage

import animated from 'animate.css' // 动画库
Vue.use(animated)
const router = initRouter(store.state.setting.asyncRoutes)
const i18n = initI18n('CN', 'US')

Vue.use(Antd)
Vue.config.productionTip = false
Vue.use(Viser)
Vue.use(Plugins)

//引入Ant Design Vue中的icon
import { Icon } from 'ant-design-vue'

//这个iconfont.js就是从iconfont.cn网站上下载后的解压JS文件
const IconFont = Icon.createFromIconfontCN({
  scriptUrl: '//at.alicdn.com/t/font_1080560_c0bh22js3ln.js',
})
//引用
Vue.component('icon-font', IconFont)

bootstrap({ router, store, i18n, message: Vue.prototype.$message })

export default new Vue({
  router,
  store,
  i18n,
  render: (h) => h(App),
}).$mount('#app')
